# -*- coding: utf-8 -*-
"""
@Time   :  "2024/8/7 22:42"
@Author :  Dilee
"""
import dotenv
from flask_migrate import Migrate
from injector import Injector

from config import Config
from internal.router import Router
from internal.server import Http
from pkg.sqlalchemy import SQLAlchemy
from .module import ExtensionModule

dotenv.load_dotenv()

conf = Config()

injector = Injector(ExtensionModule)

app = Http(__name__,
           conf=conf,
           migrate=injector.get(Migrate),
           db=injector.get(SQLAlchemy),
           router=injector.get(Router))

if __name__ == '__main__':
    app.run(debug=True)
